<template>
  <div>
    <!-- 导航栏 -->
    <van-nav-bar title="诊断"
                 left-text=""
                 right-text="保存"
                 left-arrow
                 @click-left="onClickLeft"
                 @click-right="onClickRight" />
    <!-- 选项卡 -->
    <van-tabs v-model="active">
      <van-tab title="发作类型">
        <!-- 发作类型选项卡内容 -->
        <van-tree-select height="55vw"
                         :items="items"
                         :main-active-index.sync="active1"
                         align="center">
          <template #content>
            <div class="first_content"
                 v-for="(item,index) in zhenduan"
                 :key="index">
              <div>{{item}}</div>
              <div><input type="checkbox"></div>
            </div>

          </template>
        </van-tree-select>
      </van-tab>
      <van-tab title="综合症">
        <!-- 综合症选项卡内容 -->
        <van-tree-select height="55vw"
                         :items="items1"
                         :main-active-index.sync="active1"
                         align="center">
          <template #content>
            <div class="first_content"
                 v-for="(item,index) in zhenduan1"
                 :key="index">
              <div>{{item}}</div>
              <div><input type="checkbox"></div>
            </div>

          </template>
        </van-tree-select>
      </van-tab>
    </van-tabs>
  </div>
</template>
<script>
export default {
  data () {
    return {
      active: 2,
      active1: 0,
      items: [{ text: '局灶性' }, { text: '全面性' }, { text: '发作类型不稳定' }, { text: '是否为癫痫性发作' }],
      items1: [{ text: '新生儿期' }, { text: '婴幼儿期' }, { text: '儿童期' }, { text: '青春期-成年' }, { text: '非年龄相关' }, { text: ' 外科相关' }, { text: '不诊断为癫痫的癫痫发作' }, { text: '其他部分性癫痫' }, { text: '脑区相关' }, { text: '非综合征' }],
      zhenduan: ['感觉症状', '其他简单感觉先兆（听，味，嗅等）', '复杂感觉（幻觉或错觉）', '局部阵挛强直', '负性肌阵挛', '偏转或不对称姿势强直', '偏转或姿势性强直'],
      zhenduan1: [' 良性家族性新生儿惊厥', '早期肌阵挛脑病', '大田原综合征', '良性新生儿惊厥', ' 待定'],
    };
  },
};
</script>
<style lang="less" scoped>
.first_content {
  padding: 0 10px;
  height: 50px;
  display: flex;
  justify-content: space-between;
  justify-items: center;
}
</style>